<script setup lang="ts">

import { useSettingsStore } from '/@/store/modules/settings.ts'

defineOptions({
  name: 'VipLogoVertical',
})

const settingsStore = useSettingsStore()
const { theme, logo, title } = storeToRefs(settingsStore)
</script>

<template>
  <div
    class="vip-logo"
    :class="{
      ['vip-logo-vertical']: true,
    }"
  >

    <span class="logo">
      <!-- 使用自定义svg示例 -->
      <vip-icon v-if="logo" :icon="logo" is-custom-svg />
    </span>

    <span class="title">
        {{ title }}
    </span>
  </div>
</template>

<style scoped lang="scss">

@mixin logo {
  display: inline-block;
  width: 32px;
  height: 32px;
  color: var(--el-title-color);
  vertical-align: middle;
  fill: currentColor;
}

@mixin title {
  display: inline-block;
  margin-left: 5px;
  overflow: hidden;
  font-size: 20px;
  line-height: 55px;
  //color: var(--el-title-color);
  color: var(--el-color-black);
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

@mixin container {
  position: relative;
  height: var(--el-header-height);
  line-height: var(--el-header-height);
  min-width: calc(var(--el-left-menu-width) - 50px);
  text-align: center;
  background: transparent;
  overflow: hidden;
}

.vip-logo {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--el-border-color);

  @include container;

  .logo {
    svg,
    img {
      @include logo;
    }
  }

  .title {
    @include title;
  }
}

</style>
